package com.wl.designpattern.adapter;

/**
 * 具体适配器
 *
 * Created by wangliang on 2021/2/27.
 */
public class PhoneAdapter implements Adapter {
    private Electric electric; //持有的目标对象

    public PhoneAdapter(Electric electric) {
        this.electric = electric;
    }

    @Override
    public int convert_5v() {
        System.out.println("适配器开始工作：");
        System.out.println("输入电压：" + electric.output_220v());
        System.out.println("输出电压：" + 5);
        return 5;
    }
}
